package com.zhu.algorithm.loadBalance;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: zhujiabao
 * @Date: 2022/06/08/6:46
 * @Description:模拟服务器
 */
public class ServerIps {

    public static final List<String> LIST = new ArrayList<>();
    public static final Map<String, Integer> WEIGHT_MAP = new HashMap<>();

    static {
        LIST.add("192.168.1.1");
        LIST.add("192.168.1.2");
        LIST.add("192.168.1.3");
        LIST.add("192.168.1.4");
        LIST.add("192.168.1.5");
        LIST.add("192.168.1.6");
        LIST.add("192.168.1.7");
        LIST.add("192.168.1.8");
        LIST.add("192.168.1.9");
        LIST.add("192.168.1.10");
    }

    static {
        WEIGHT_MAP.put("192.168.1.1",2);
        WEIGHT_MAP.put("192.168.1.2",8);
        WEIGHT_MAP.put("192.168.1.3",1);
        WEIGHT_MAP.put("192.168.1.4",9);
        WEIGHT_MAP.put("192.168.1.5",3);
        WEIGHT_MAP.put("192.168.1.6",7);
        WEIGHT_MAP.put("192.168.1.7",4);
        WEIGHT_MAP.put("192.168.1.8",6);
        WEIGHT_MAP.put("192.168.1.9",2);
        WEIGHT_MAP.put("192.168.1.10",8);

        /*权重相等时*/
        /*WEIGHT_MAP.put("192.168.1.1",5);
        WEIGHT_MAP.put("192.168.1.2",5);
        WEIGHT_MAP.put("192.168.1.3",5);
        WEIGHT_MAP.put("192.168.1.4",5);
        WEIGHT_MAP.put("192.168.1.5",5);
        WEIGHT_MAP.put("192.168.1.6",5);
        WEIGHT_MAP.put("192.168.1.7",5);
        WEIGHT_MAP.put("192.168.1.8",5);
        WEIGHT_MAP.put("192.168.1.9",5);
        WEIGHT_MAP.put("192.168.1.10",5);*/
    }


}
